home *** CD-ROM | disk | FTP | other *** search
/ 600 Games / 600games.iso / Nave / sky-chopper.swf / scripts / frame_312 / PlaceObject2_1432_3 / CLIPACTIONRECORD onClipEvent(load).as
Encoding:
Text File  |  2005-09-29  |  4.8 KB  |  151 lines

  1. onClipEvent(load){
  2.    function clear()
  3.    {
  4.       for(j in itemTracker)
  5.       {
  6.          removeMovieClip(itemTracker[j]);
  7.       }
  8.       this.itemCount = 0;
  9.       itemTracker = new Array();
  10.    }
  11.    function addItem(input)
  12.    {
  13.       var _loc1_ = this;
  14.       var _loc2_ = _root;
  15.       currentItem = _loc1_.carrier.attachMovie("item","item_" + ++itemCount,itemCount);
  16.       currentItem._y = itemCount * currentItem._height - currentItem._height + 1;
  17.       currentItem._x = 1;
  18.       itemTracker.push(currentItem);
  19.       if(itemCount / 2 == int(itemCount / 2))
  20.       {
  21.          currentItem.cmode = 1;
  22.       }
  23.       else
  24.       {
  25.          currentItem.cmode = 0;
  26.       }
  27.       if(currentItem.cmode == 1)
  28.       {
  29.          currentItem.gotoAndStop(1);
  30.          currentItem.onRollOver = function()
  31.          {
  32.             if(!this.chosen)
  33.             {
  34.                this.gotoAndStop(2);
  35.             }
  36.          };
  37.          currentItem.onRollOut = function()
  38.          {
  39.             if(!this.chosen)
  40.             {
  41.                this.gotoAndStop(1);
  42.             }
  43.          };
  44.          currentItem.onDragOut = function()
  45.          {
  46.             if(!this.chosen)
  47.             {
  48.                this.gotoAndStop(1);
  49.             }
  50.          };
  51.       }
  52.       if(currentItem.cmode == 0)
  53.       {
  54.          currentItem.gotoAndStop(3);
  55.          currentItem.onRollOver = function()
  56.          {
  57.             if(!this.chosen)
  58.             {
  59.                this.gotoAndStop(4);
  60.             }
  61.          };
  62.          currentItem.onRollOut = function()
  63.          {
  64.             if(!this.chosen)
  65.             {
  66.                this.gotoAndStop(3);
  67.             }
  68.          };
  69.          currentItem.onDragOut = function()
  70.          {
  71.             if(!this.chosen)
  72.             {
  73.                this.gotoAndStop(3);
  74.             }
  75.          };
  76.       }
  77.       currentItem.onRelease = function()
  78.       {
  79.          var _loc1_ = _root;
  80.          var _loc2_ = this;
  81.          _loc2_.gotoAndStop(5);
  82.          _loc2_.chosen = 1;
  83.          if(_loc1_.lastSel != _loc2_)
  84.          {
  85.             if(_loc1_.lastSel.cmode == 0)
  86.             {
  87.                _loc1_.lastSel.gotoAndStop(3);
  88.             }
  89.             if(_loc1_.lastSel.cmode == 1)
  90.             {
  91.                _loc1_.lastSel.gotoAndStop(1);
  92.             }
  93.          }
  94.          _loc1_.lastSel.chosen = 0;
  95.          _loc1_.levelfile = input.file;
  96.          _loc1_.lastSel = _loc2_;
  97.       };
  98.       currentItem.createTextField("my_txt1",99999,1,-1,180,50);
  99.       currentItem.my_txt1._quality("BEST");
  100.       currentItem.my_txt1.multiline = true;
  101.       currentItem.my_txt1.text = input.name;
  102.       currentItem.my_txt1.selectable = false;
  103.       currentItem.my_txt1.wordWrap = true;
  104.       currentItem.my_txt1.embedFonts = true;
  105.       currentItem.my_fmt = new TextFormat();
  106.       currentItem.my_fmt.font = "crylleefont";
  107.       currentItem.my_fmt.size = 10;
  108.       currentItem.my_fmt.color = "0x000000";
  109.       currentItem.my_txt1.setTextFormat(currentItem.my_fmt);
  110.       currentItem.createTextField("my_txt2",99998,200,-1,250,50);
  111.       currentItem.my_txt2._quality("BEST");
  112.       currentItem.my_txt2.multiline = true;
  113.       currentItem.my_txt2.text = input.author;
  114.       currentItem.my_txt2.selectable = false;
  115.       currentItem.my_txt2.wordWrap = true;
  116.       currentItem.my_txt2.embedFonts = true;
  117.       currentItem.my_fmt = new TextFormat();
  118.       currentItem.my_fmt.font = "crylleefont";
  119.       currentItem.my_fmt.size = 10;
  120.       currentItem.my_fmt.color = "0x000000";
  121.       currentItem.my_txt2.setTextFormat(currentItem.my_fmt);
  122.       currentItem.createTextField("my_txt3",99997,300,-1,250,50);
  123.       currentItem.my_txt3._quality("BEST");
  124.       currentItem.my_txt3.multiline = true;
  125.       currentItem.my_txt3.text = input.date;
  126.       currentItem.my_txt3.selectable = false;
  127.       currentItem.my_txt3.wordWrap = true;
  128.       currentItem.my_txt3.embedFonts = true;
  129.       currentItem.my_fmt = new TextFormat();
  130.       currentItem.my_fmt.font = "crylleefont";
  131.       currentItem.my_fmt.size = 10;
  132.       currentItem.my_fmt.color = "0x000000";
  133.       currentItem.my_txt3.setTextFormat(currentItem.my_fmt);
  134.       currentItem.createTextField("my_txt4",99996,400,-1,250,50);
  135.       currentItem.my_txt4._quality("BEST");
  136.       currentItem.my_txt4.multiline = true;
  137.       currentItem.my_txt4.text = input.rating;
  138.       currentItem.my_txt4.selectable = false;
  139.       currentItem.my_txt4.wordWrap = true;
  140.       currentItem.my_txt4.embedFonts = true;
  141.       currentItem.my_fmt = new TextFormat();
  142.       currentItem.my_fmt.font = "crylleefont";
  143.       currentItem.my_fmt.size = 10;
  144.       currentItem.my_fmt.color = "0x000000";
  145.       currentItem.my_txt4.setTextFormat(currentItem.my_fmt);
  146.       _loc1_.carrier.setMask(themask);
  147.    }
  148.    this.itemCount = 0;
  149.    itemTracker = new Array();
  150. }
  151.